// cookbook数据处理  模型层
import net from '../api/net'
import config from '../config/homeUri'

class HomeModel {

  // swiper数据获取
  async getSwiperData() {
    let ret = await net.get(config.swiper)
    // console.log(ret)
    /* let data = ret.data.data
    console.log(data.slice(0, 2));
    return data.slice(0, 2) */
    return ret
  }

  //home页面listview数据获取
  async getHomeListrData(params = {}) {
    let ret = await net.get(config.homeListData, params)
    // console.log( ret )
    return ret
  }

}

export default new HomeModel()